fix(project): handle registry list retrieval error gracefully#1014
fix(project): handle registry list retrieval error gracefully#1014saiashok0981 wants to merge 1 commit into
Conversation
Signed-off-by: saiashok103@gmail.com
|
Looking at both getRegistryList() and ListRegistries(), the nil checks here seem unnecessary. Both wrappers return nil, err on failure and response, nil on success. If the generated client could theoretically return nil, nil, that should probably be guarded once in the wrapper rather than in every caller. Also, checking Payload != nil is not needed because ranging over a nil or empty slice is safe in Go. The actual behavior change is that errors from getRegistryList() are no longer returned. If the registry list is optional for rendering this view, logging and continuing makes sense, but we should make that intention explicit. |
|
Also DCO is failing and this PR has no linked issue |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1014 +/- ##
=========================================
- Coverage 10.99% 9.34% -1.65%
=========================================
Files 173 321 +148
Lines 8671 16083 +7412
=========================================
+ Hits 953 1503 +550
- Misses 7612 14446 +6834
- Partials 106 134 +28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
This PR makes interactive project creation resilient to registry listing API failures.
Rationale & Design Decisions
Registrylisting endpoint fails or is unauthorized,CreateProjectViewfails immediately.Signed-off-by: saiashok103@gmail.com